<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:c="http://xmlns.jcp.org/jsf/composite"
	xmlns:p="http://primefaces.org/ui">

<ui:decorate template="/jsp/WEB/pageLayout.xhtml">
	<ui:define name="centro">

		<h:form>

			 <p:fieldset legend="Filtro por data de registro" toggleable="true" toggleSpeed="500">
				<p:growl id="msgs" showDetail="true" />

				<h:outputScript name="calendario_pt_BR.js" library="js" />
				<h:panelGrid id="gridRel" columns="6"
					style="border:0px;margin-top:1%;">
					<p:outputLabel for="date" value="Data inicial:" />
					<p:calendar id="date" size="8" value="#{RelatorioTecnicoBean.initialDate}"
						locale="pt_BR" pattern="dd/MM/yyyy">
					</p:calendar>

					<h:outputLabel for="datefim" value="Data final:" />
					<p:calendar id="datefim" size="8" value="#{RelatorioTecnicoBean.finalDate}"
						locale="pt_BR" pattern="dd/MM/yyyy">
					</p:calendar>
					<p:commandButton id="searchButton" value="Buscar"
						image="ui-icon-search" update="gridRel" ajax="false"
						title="Localizar Log durante este período"
						actionListener="#{RelatorioTecnicoBean.exibirRelatorio}" />
				</h:panelGrid>
		</p:fieldset>

			<p:dataTable id="tbMaster" style="margin-top:1%; max-width: 2500px; min-width: 2500px"
				widgetVar="relTable" value="#{RelatorioTecnicoBean.relTecList}" var="log"
				rowIndexVar="rowIndex" emptyMessage="Nenhum registro encontrado!"
				paginator="true" rows="20" rowsPerPageTemplate="10,20,30,40,50">

				<f:facet name="header" style="text-align:left">
					<p:outputPanel>
						<h:outputText value="Buscar todos os campos:" />
						<p:inputText id="globalFilter" onkeyup="PF('relTable').filter()"
							style="width:150px" placeholder="Digite a palavra" />
					</p:outputPanel>
				</f:facet>				

				<p:column headerText="Id" filterBy="#{log.idLog}"   
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.idLog} " />
				</p:column>

				<p:column headerText="Tipo Consulta" filterBy="#{log.tipoConsulta}"  
  					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.tipoConsulta}" />
				</p:column>

				<p:column headerText="Data Registro" filterBy="#{log.data}"  
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.data}">
						<f:convertDateTime locale="pt_BR" pattern="dd/MM/yyyy" />
					</h:outputText>
				</p:column>

				<p:column headerText="Hora Pos" filterBy="#{log.posHora}"   
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posHora}">
					</h:outputText>
				</p:column>
				
				<p:column headerText="Hora início operação" filterBy="#{log.horaInicioOperacao}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.horaInicioOperacao}">
					</h:outputText>
				</p:column>
				
				<p:column headerText="Hora da requisição" filterBy="#{log.horaRequisicao}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.horaRequisicao}">
					</h:outputText>
				</p:column>
					
				<p:column headerText="Hora do retorno" filterBy="#{log.horaRetorno}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.horaRetorno}">
					</h:outputText>
				</p:column>
				
				<p:column headerText="Grupo" filterBy="#{log.algGrupo}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algGrupo}" />
				</p:column>

				<p:column headerText="Loja" filterBy="#{log.algLoja}"   
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algLoja}" />
				</p:column>
				
				<p:column headerText="Url" filterBy="#{log.algUrl}" 
					style="text-align:center; font-size:11px; 
					max-width: 200px; min-width: 200px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algUrl}" />
				</p:column>

				<p:column headerText="Cliente" filterBy="#{log.algCliente}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algCliente}" />
				</p:column>

				<p:column headerText="Código do erro" filterBy="#{log.algTransCodigo}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algTransCodigo}" />
				</p:column>

				<p:column headerText="Mensagem da transação" filterBy="#{log.algTransMsg}"  
					style="text-align:center; font-size:11px; 
					max-width: 80px; min-width: 80px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.algTransMsg}" />
				</p:column>

				<p:column headerText="Serial" filterBy="#{log.posSerial}"  
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posSerial}" />
				</p:column>

				<p:column headerText="Modelo Pos" filterBy="#{log.posModelo}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posModelo}" />
				</p:column>

				<p:column headerText="Versão Navs" filterBy="#{log.posNavsVersao}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posNavsVersao}" />
				</p:column>

				<p:column headerText="Versão OS" filterBy="#{log.posOsVersao}" 
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posOsVersao}" />
				</p:column>
				
				<p:column headerText="Versão Lua" filterBy="#{log.posLuaVersao}"   
					style="text-align:center; font-size:11px; 
					max-width: 65px; min-width: 65px; overflow: hidden" filterMatchMode="contains">
					<h:outputText value="#{log.posLuaVersao}" />
				</p:column>
				
			</p:dataTable>

			<br />
			<!--  	<p:panel id="ResumoMes" header="Resumo Anual" footer="Comparativo com ano anterior"
				style="margin-bottom:20px">
				<h:panelGrid columns="2" cellpadding="10">
					<p:lineChart xaxisLabel="Mês" yaxisLabel="Valor Total" showDatatip="true"
						value="#{dashboardBean.linearModel2}" legendPosition="nw"
						xaxisAngle="45" animate="true" style="height:200px;width: 500px;" />
				</h:panelGrid>
			</p:panel>-->

		</h:form>
	</ui:define>
</ui:decorate>

</html>




